CFILES = src

.PHONY: all
all: ex_5_1 ex_5_2 ex_5_3 ex_5_4 ex_5_5 \
	 ex_5_7 ex_5_8 ex_5_9 ex_5_10 \
	 ex_5_11 ex_5_12 ex_5_13

ex_5_1: ${CFILES}/ex_5_1.c
	gcc ${CFILES}/ex_5_1.c -o ex_5_1
ex_5_2: ${CFILES}/ex_5_2.c
	gcc ${CFILES}/ex_5_2.c -o ex_5_2
ex_5_3: ${CFILES}/ex_5_3.c
	gcc ${CFILES}/ex_5_3.c -o ex_5_3
ex_5_4: ${CFILES}/ex_5_4.c
	gcc ${CFILES}/ex_5_4.c -o ex_5_4
ex_5_5: ${CFILES}/ex_5_5.c
	gcc ${CFILES}/ex_5_5.c -o ex_5_5
#ex_5_6: ${CFILES}/ex_5_6.c
#	gcc ${CFILES}/ex_5_6.c -o ex_5_6
ex_5_7: ${CFILES}/ex_5_7.c
	gcc ${CFILES}/ex_5_7.c -o ex_5_7
ex_5_8: ${CFILES}/ex_5_8.c
	gcc ${CFILES}/ex_5_8.c -o ex_5_8
ex_5_9: ${CFILES}/ex_5_9.c
	gcc ${CFILES}/ex_5_9.c -lm -o ex_5_9
ex_5_10: ${CFILES}/ex_5_10.c
	gcc ${CFILES}/ex_5_10.c -o ex_5_10
ex_5_11: ${CFILES}/ex_5_11.c
	gcc ${CFILES}/ex_5_11.c -o ex_5_11
ex_5_12: ${CFILES}/ex_5_12.c
	gcc ${CFILES}/ex_5_12.c -o ex_5_12
ex_5_13: ${CFILES}/ex_5_13.c
	gcc ${CFILES}/ex_5_13.c -o ex_5_13
#目标文件移动到./obj 目录下
	mv ./ex_5_* ./obj/

clean:
	rm ./obj/ex_5_*
